/*
==========================================================
Board Class Header
DevX Team
==========================================================
*/

#ifndef _BOARD_H_
#define _BOARD_H_

#include <vector>
#include <iostream>
#include "Structures.h"
#include "Piece.h"

using namespace std;

class dxBoard
{

	public:
		dxBoard();
		~dxBoard();
		
		static int                     GetBlockColor(int x, int y);
		
		const void				        Draw() const; 
		void							Input();
		bool							Select( const position_t pos );
		bool							Move( const position_t pos );
		bool							End();
		void							Check();
		
	    static int                      GetSelectedRow();
		static int                      GetSelectedColumn();
		static int                      GetCurrentColumn();
		static int                      GetCurrentRow();
		
	private:
		dxPiece *					pieces[ROWS][COLUMNS];
		vector<dxPiece*>	player1CapturedPieces;
		vector<dxPiece*>	player2CapturedPieces;
		position_t				currentPosition;
		bool							isSelected;
		bool							isFinished;              
	    player_t					currentPlayer;
	    position_t				selectedPosition;
		bool							CheckKing( const position_t pos );
		bool							CheckQueen( const position_t pos );
		bool							CheckBishop( const position_t pos );
		bool							CheckKnight( const position_t pos );
		bool							CheckRook( const position_t pos );
		bool							CheckPawn( const position_t pos );

};

#endif